HA$PBExportHeader$u_cst_grid_bandejaentrada.sru
forward
global type u_cst_grid_bandejaentrada from u_cst_gridmain
end type
end forward

global type u_cst_grid_bandejaentrada from u_cst_gridmain
integer width = 3351
integer height = 3100
event ue_reenviar ( )
event ue_finalizar ( )
event ue_mover ( )
event ue_anular ( )
event ue_conforme ( )
event ue_noconforme ( )
event ue_viewdocu ( )
event ue_aprobar ( )
end type
global u_cst_grid_bandejaentrada u_cst_grid_bandejaentrada

type variables
integer ii_tabindex
datawindowchild dwc
OLEObject iOLE_Doc
end variables

forward prototypes
public function integer of_view (long al_codigo)
end prototypes

event ue_reenviar();Long ll_count,ll_idorden,ll_orden[],ll_osac[]
integer li_find_dw1,li_fila,li_find
string ls_boton,ls_titulo,ls_ordenes,ls_orden,ls_osacs,ls_tipoMsj[],ls_tmsj
if dw_1.rowcount( ) <=0 then return
// Get each of the selected
ll_orden = dw_1.Object.idorden.Current.Selected
ll_osac = dw_1.Object.idosac.Current.Selected
ls_tipoMsj = dw_1.Object.ttipomsj.Current.Selected
// Find the number of selected items by finding the size of the array
ll_count = upperBound(ll_orden)

if ll_count <= 0 then
	return
end if

for li_fila = 1 to upperBound(ls_tipoMsj)
	ls_tmsj = ls_tipoMsj[li_fila]
	if ls_tmsj <>  'N' then  return
	//if ls_tmsj 'R' or ls_tmsj = 'F' or ls_tmsj = 'A'  or ls_tmsj = 'C'  or ls_tmsj = 'X' then  return
Next



ls_ordenes = ''
for li_fila = 1 to ll_count
	ls_orden =string( ll_orden[li_fila])
	
	if li_fila  > 1  then
		ls_ordenes =ls_ordenes + ',' + ls_orden
	else
		ls_ordenes =ls_orden 
	end if
next
ls_osacs = '' 
ls_orden =''
for li_fila = 1 to ll_count
	ls_orden =string( ll_osac[li_fila])
	
	if li_fila  > 1  then
		ls_osacs =ls_osacs + ',' + ls_orden
	else
		ls_osacs =ls_orden 
	end if
next
	ii_tabindex++
	ls_titulo = 'Reenviar Solicitud'// + ids_datastore.object.cdesc[1]
//		iou_powerdock.of_opendocument( iuo_userObject[ii_tabindex],istr_parm,ls_titulo ,ls_rutaMain,'u_cst_manto_main_cabedet')
//	istr_parm.long_parm[1] = 1
	istr_parm.string_parm[1] = ls_ordenes
	istr_parm.string_parm[2] = ls_osacs
	istr_parm.auo_userobject =this
	iou_powerdock.of_opendocument(  iuo_user[ii_tabindex],istr_parm,ls_titulo ,'InsertReturn!','u_cst_envio_mensajes')
	iou_powerdock.of_ActivateDocument(iuo_user[ii_tabindex])

//
//for li_fila = 1 to ll_count
//		
//	ll_idorden = ll_button[li_fila]
//	
//
//	if sqlca.Usp_Add_OSAC(ll_idorden,'4','E') <> 0 then 
//		RollBack;
//
//	End if		
//
//next
//commit;
//

end event

event ue_finalizar();Long ll_count,ll_idorden,ll_orden[],ll_osac[]
integer li_find_dw1,li_fila,li_find
string ls_boton,ls_titulo,ls_ordenes,ls_orden,ls_iduser [],ls_usuarios,ls_user,ls_osacs,ls_tipoMsj[],ls_tmsj,ls_fecha, ls_fechas

if dw_1.rowcount( ) <=0 then return
ll_orden = dw_1.Object.idorden.Current.Selected
ls_iduser = dw_1.Object.iduser.Current.Selected
ll_osac = dw_1.Object.idosac.Current.Selected
ls_tipoMsj = dw_1.Object.ttipomsj.Current.Selected

// Find the number of selected items by finding the size of the array
ll_count = upperBound(ll_orden)

if ll_count <= 0 then
	return
end if

for li_fila = 1 to upperBound(ls_tipoMsj)
	ls_tmsj = ls_tipoMsj[li_fila]
	if ls_tmsj ='F' or ls_tmsj ='A'  or ls_tmsj ='C'  then  return
Next

if ll_count > 1 then
	f_msj('Solo se permite finalizar por cada ticket',4) ; return
end if


ls_ordenes = ''; ls_fechas = ''
for li_fila = 1 to ll_count
	ls_orden =string( ll_orden[li_fila])
	
	select fProceso into :ls_fecha from mosac where idorden = :ls_orden and bOrigen=1;

	
	if li_fila  > 1  then
		ls_ordenes =ls_ordenes + ',' + ls_orden
		ls_fechas = ls_fechas +','+ ls_fecha
	else
		ls_ordenes =ls_orden 
		ls_fechas = ls_fecha
	end if
next
ls_osacs = '' 
ls_orden =''
for li_fila = 1 to ll_count
	ls_orden =string( ll_osac[li_fila])
	
	if li_fila  > 1  then
		ls_osacs =ls_osacs + ',' + ls_orden
	else
		ls_osacs =ls_orden 
	end if
next


 ls_usuarios=''
 dw_findoutput.dataobject = 'd_cadena_external'
ll_count = upperBound(ls_iduser)
for li_fila = 1 to ll_count
	ls_user =ls_iduser[li_fila]
	li_find = dw_findoutput.find('cadena = "'+ls_user+'"',1,dw_findoutput.rowcount())
	if li_find <> 0  then
		continue
	end if
	
	if li_fila  > 1  then
		ls_usuarios =ls_usuarios + ',' + ls_user
	else
		ls_usuarios =ls_user 
	end if
	dw_findoutput.scrolltorow(dw_findoutput.insertrow(0))
	dw_findoutput.object.cadena[dw_findoutput.rowcount()] =ls_user
next

	ii_tabindex++
	ls_titulo = 'Finalizar Solicitud'// + ids_datastore.object.cdesc[1]
	istr_parm.string_parm[1] = ls_ordenes
	istr_parm.string_parm[2] = ls_usuarios
	istr_parm.string_parm[3] = ls_osacs
	istr_parm.string_parm[4] = ls_fechas
	istr_parm.auo_userobject =this
	iou_powerdock.of_opendocument(  iuo_user[ii_tabindex],istr_parm,ls_titulo ,'InkPicture!','u_cst_reenviar_mensaje')
	iou_powerdock.of_ActivateDocument(iuo_user[ii_tabindex])


end event

event ue_mover();Long ll_count,ll_idorden,ll_orden[],ll_osac[],ll_idosac
integer li_find_dw1,li_fila,li_find
string ls_boton,ls_titulo,ls_ordenes,ls_orden,ls_iduser [],ls_usuarios,ls_user,ls_osacs,ls_tipoMsj[],ls_tmsj
if dw_1.rowcount( ) <=0 then return
ls_tipoMsj = dw_1.Object.ttipomsj.Current.Selected
ll_osac = dw_1.Object.idosac.Current.Selected


ll_count = upperBound(ll_osac)

if ll_count <= 0 then
	return
end if

for li_fila = 1 to upperBound(ls_tipoMsj)
	ls_tmsj = ls_tipoMsj[li_fila]
	if ls_tmsj <> 'F' and  ls_tmsj <>  'A' and  ls_tmsj <>  'C' and  ls_tmsj <>  'X'  then  return
	
next

if f_msj('$$HEX1$$bf00$$ENDHEX$$Estas seguro que deseas mover los mensajes finalizados ?',2) = 2 then return 

ls_osacs = '' 
ls_orden =''
for li_fila = 1 to  upperBound(ll_osac)
	ll_idosac =ll_osac[li_fila]
	
	update mosac set ttipo = 'S' where idosac = :ll_idosac;
	
next

commit;
event ue_refrescar( )


end event

event ue_anular();Long ll_count,ll_idorden,ll_orden[],ll_osac[]
integer li_find_dw1,li_fila,li_find
string ls_boton,ls_titulo,ls_ordenes,ls_orden,ls_osacs,ls_tipoMsj[],ls_tmsj,ls_iduser[],ls_usuarios,ls_user

// Get each of the selected
if dw_1.rowcount( ) <=0 then return

ls_iduser = dw_1.Object.iduser.Current.Selected
ll_orden = dw_1.Object.idorden.Current.Selected
ll_osac = dw_1.Object.idosac.Current.Selected
ls_tipoMsj = dw_1.Object.ttipomsj.Current.Selected
// Find the number of selected items by finding the size of the array
ll_count = upperBound(ll_orden)

if ll_count <= 0 then
	return
end if
for li_fila = 1 to upperBound(ls_tipoMsj)
	ls_tmsj = ls_tipoMsj[li_fila]
	if ls_tmsj = 'R' or ls_tmsj = 'F'  or ls_tmsj = 'C'  or ls_tmsj = 'X' then  return
Next

ls_ordenes = ''
for li_fila = 1 to ll_count
	ls_orden =string( ll_orden[li_fila])
	if li_fila  > 1  then
		ls_ordenes =ls_ordenes + ',' + ls_orden
	else
		ls_ordenes =ls_orden 
	end if
next

ls_osacs = ''  ; ls_orden =''
for li_fila = 1 to ll_count
	ls_orden =string( ll_osac[li_fila])
	
	if li_fila  > 1  then
		ls_osacs =ls_osacs + ',' + ls_orden
	else
		ls_osacs =ls_orden 
	end if
next

ls_usuarios=''
dw_findoutput.dataobject = 'd_cadena_external'
ll_count = upperBound(ls_iduser)
for li_fila = 1 to ll_count
	ls_user =ls_iduser[li_fila]
	li_find = dw_findoutput.find('cadena = "'+ls_user+'"',1,dw_findoutput.rowcount())
	if li_find <> 0  then
		continue
	end if
	
	if li_fila  > 1  then
		ls_usuarios =ls_usuarios + ',' + ls_user
	else
		ls_usuarios =ls_user 
	end if
	dw_findoutput.scrolltorow(dw_findoutput.insertrow(0))
	dw_findoutput.object.cadena[dw_findoutput.rowcount()] =ls_user
next

	ii_tabindex++
	ls_titulo = 'Anular Solicitud'// + ids_datastore.object.cdesc[1]
	istr_parm.string_parm[1] = ls_ordenes
	istr_parm.string_parm[2] = ls_usuarios
	istr_parm.string_parm[3] = ls_osacs
	istr_parm.auo_userobject =this
	iou_powerdock.of_opendocument(  iuo_user[ii_tabindex],istr_parm,ls_titulo ,'NotFound!','u_cst_anular_msj')
	iou_powerdock.of_ActivateDocument(iuo_user[ii_tabindex])
	
	
end event

event ue_conforme();Long ll_count,ll_idorden,ll_orden[],ll_osac[],ll_osac_new
integer li_find_dw1,li_fila,li_find,li_ini,li_orden
string ls_boton,ls_titulo,ls_ordenes,ls_orden,ls_osacs,ls_tipoMsj[],ls_tmsj,ls_iduser[],ls_usuarios,ls_user,ls_tickets,ls_orden_temp
// Get each of the selected
if dw_1.rowcount( ) <=0 then return
ls_iduser  = dw_1.Object.iduser.Current.Selected
ll_orden   = dw_1.Object.idorden.Current.Selected
ll_osac     = dw_1.Object.idosac.Current.Selected
ls_tipoMsj = dw_1.Object.ttipomsj.Current.Selected
// Find the number of selected items by finding the size of the array
ll_count = upperBound(ll_orden)
if ll_count <= 0 then 	return

for li_fila = 1 to upperBound(ls_tipoMsj)
	ls_tmsj = ls_tipoMsj[li_fila]
	if ls_tmsj = 'R' or ls_tmsj = 'A' then  return
Next
ls_osacs = ''  
ls_orden =''
for li_fila = 1 to ll_count
	ls_orden =string( ll_orden[li_fila])
	if li_fila  > 1  then
		ls_osacs =ls_osacs + ',' + ls_orden
	else
		ls_osacs =ls_orden 
	end if
next

if f_msj('$$HEX1$$bf00$$ENDHEX$$Estas seguro que deseas dar conformidad el o  los tickets N$$HEX1$$ba00$$ENDHEX$$: '+ls_osacs +'  ?',2) = 2 then return

for li_fila = 1 to upperBound(ll_osac)
	ll_idorden = ll_osac[li_fila]
	update MOSAC set tTipo='S' where idOsac = :ll_idorden  ;
next

ls_orden_temp =ls_osacs
DO WHILE len(ls_orden_temp)> 0
		li_ini = pos(ls_orden_temp,',')
		if li_ini = 0 then
			li_orden=integer(ls_orden_temp)
			ls_orden_temp = ''
		else
			li_orden =integer(mid(ls_orden_temp,1,li_ini ))
			ls_orden_temp = RIGHT(ls_orden_temp,LEN(ls_orden_temp) - LEN(string(li_orden))  -1)
		end if
		update MOSAC set bstat='C' where idorden = :li_orden  ;
		
		update MOSAC set tTipo='S' where idorden = :li_orden and ttipomsj = 'F'   and tTipo <> 'S';
		
LOOP			

if sqlca.Usp_Insert_Mosac( gs_iduser,'hchavez', 'Conforme', 'Conforme', ls_osacs) <> 0 then
	rollback USING SQLCA ;
	f_msj('Error al insertar al mosac' + sqlca.SQLERRTEXT,1)
	return 
end if
		  
commit;
event ue_refrescar( )


end event

event ue_noconforme();Long ll_count,ll_idorden,ll_orden[],ll_osac[]
integer li_find_dw1,li_fila,li_find
string ls_boton,ls_titulo,ls_ordenes,ls_orden,ls_osacs,ls_tipoMsj[],ls_tmsj,ls_iduser[],ls_usuarios,ls_user

if dw_1.rowcount( ) <=0 then return



// Get each of the selected
ls_iduser = dw_1.Object.iduser.Current.Selected
ll_orden = dw_1.Object.idorden.Current.Selected
ls_ordenes  = string(dw_1.Object.idorden[dw_1.getrow()])

ll_osac = dw_1.Object.idosac.Current.Selected
ls_osacs = string(dw_1.Object.idosac[dw_1.getrow()])
ls_tipoMsj = dw_1.Object.ttipomsj.Current.Selected
// Find the number of selected items by finding the size of the array
ll_count = upperBound(ll_orden)

if ll_count <= 0 then
	return
end if


if  dw_1.object.bstat[dw_1.getrow()] ='C' then
	f_msj('El ticket ya esta cerrado',4) ; return
end if

for li_fila = 1 to upperBound(ls_tipoMsj)
	ls_tmsj = ls_tipoMsj[li_fila]
	if ls_tmsj <> 'F'   then  return
Next

if ll_count > 1  then
	f_msj('Solo se permite seleccionar un solo ticket',4) ; return
end if

//ls_ordenes = ''
//for li_fila = 1 to ll_count
//	ls_orden =string( ll_orden[li_fila])
//	if li_fila  > 1  then
//		ls_ordenes =ls_ordenes + ',' + ls_orden
//	else
//		ls_ordenes =ls_orden 
//	end if
//next
//
//ls_osacs = ''  ; ls_orden =''
//for li_fila = 1 to ll_count
//	ls_orden =string( ll_osac[li_fila])
//	
//	if li_fila  > 1  then
//		ls_osacs =ls_osacs + ',' + ls_orden
//	else
//		ls_osacs =ls_orden 
//	end if
//next

//ls_usuarios=''
//dw_findoutput.dataobject = 'd_cadena_external'
//ll_count = upperBound(ls_iduser)
//for li_fila = 1 to ll_count
//	ls_user =ls_iduser[li_fila]
//	li_find = dw_findoutput.find('cadena = "'+ls_user+'"',1,dw_findoutput.rowcount())
//	if li_find <> 0  then
//		continue
//	end if
//	
//	if li_fila  > 1  then
//		ls_usuarios =ls_usuarios + ',' + ls_user
//	else
//		ls_usuarios =ls_user 
//	end if
//	dw_findoutput.scrolltorow(dw_findoutput.insertrow(0))
//	dw_findoutput.object.cadena[dw_findoutput.rowcount()] =ls_user
//next

	ii_tabindex++
	ls_titulo = 'No Conforme'// + ids_datastore.object.cdesc[1]
	istr_parm.string_parm[1] = ls_ordenes
	istr_parm.string_parm[2] = 'hchavez' // ls_usuarios
	istr_parm.string_parm[3] = ls_osacs
	istr_parm.auo_userobject =this
	iou_powerdock.of_opendocument(  iuo_user[ii_tabindex],istr_parm,ls_titulo ,'EditStops5!','u_cst_noconforme_msj')
	iou_powerdock.of_ActivateDocument(iuo_user[ii_tabindex])
end event

event ue_viewdocu();Long ll_count,ll_idorden,ll_osac 
integer li_find_dw1,li_fila,li_find
string ls_boton,ls_titulo,ls_ordenes,ls_orden,ls_iduser [],ls_usuarios,ls_user,ls_osacs,ls_tipoMsj[],ls_tmsj,ls_fecha, ls_fechas

if dw_1.rowcount( ) <=0 then return


//ll_osac = dw_1.Object.idosac[dw_1.getrow()]
ll_idorden = dw_1.Object.idorden[dw_1.getrow()]

select top 1  idosac into :ll_osac from mosac where idorden = :ll_idorden and borigen = 1 and ttipo = 'O' ;

of_view(ll_osac)


end event

event ue_aprobar();Long ll_count,ll_idorden,ll_orden,ll_osac[],ll_osac_new,ll_idosac
integer li_find_dw1,li_fila,li_find,li_ini,li_orden
string ls_boton,ls_titulo,ls_ordenes,ls_orden,ls_osacs,ls_tipoMsj[],ls_tmsj,ls_iduser[],ls_usuarios,ls_user,ls_tickets,ls_orden_temp

// Get each of the selected
if dw_1.rowcount( ) <=0 then return
//ls_iduser  = dw_1.Object.iduser.Current.Selected
//ll_orden   = dw_1.Object.idorden.Current.Selected
ll_osac     = dw_1.Object.idosac.Current.Selected
ls_tipoMsj = dw_1.Object.ttipomsj.Current.Selected
//ls_tickets  = dw_1.Object.tosac[DW_1.GETROW()]
ll_idosac = dw_1.Object.idosac[dw_1.getrow()]
ll_orden = dw_1.Object.idorden[dw_1.getrow()]
ll_count = upperBound(ll_osac)
if ll_count <= 0 then
	return
end if

for li_fila = 1 to upperBound(ls_tipoMsj)
	ls_tmsj = ls_tipoMsj[li_fila]
	if ls_tmsj = 'R' or ls_tmsj = 'F' or ls_tmsj = 'A'  or ls_tmsj = 'C' then  return
Next
//
//if  dw_1.object.bstat[dw_1.getrow()] ='C' then
//	f_msj('El ticket ya esta cerrado',4) ; return
//end if

if f_msj('$$HEX1$$bf00$$ENDHEX$$Esta seguro que desea aprobar ? .Una vez Aprobado se enviar$$HEX2$$e1002000$$ENDHEX$$el ticket(s) al administrador',2) = 2 then return


for li_fila = 1 to upperBound(ll_osac)
//	ls_tmsj = ls_tipoMsj[li_fila]
//	if ls_tmsj = 'R' or ls_tmsj = 'A' then  return
	ll_idosac =  ll_osac[li_fila]
	update MOSAC set tTipo='S' where idOsac = :ll_idosac  ;
	
	if sqlca.Usp_Add_OSAC(ll_idosac,'hchavez','N','E') <> 0 then 
		f_msg(sqlca.sqlerrtext,1)
		RollBack; 	Return  
	End if		
Next

Commit;
event ue_refrescar( )
end event

public function integer of_view (long al_codigo);String ls_DocID, ls_DocPath, ls_MessageTitle ,ls_docu,ls_tipoDocu
Integer li_FileNum, li_Count
blob	lblb_Doc ,lbl_temp

select img_DocuTxt into :ls_docu from  mosac where idosac = :al_codigo;

ls_tipoDocu = upper(right(trim(ls_docu),3) )

ls_DocPath = 'C:\apl_app\documento777.'+Lower ( ls_tipoDocu )

If FileExists ( ls_DocPath ) Then 	FileDelete ( ls_DocPath )

li_filenum = FileOpen ( ls_docpath, StreamMode!, Write! )

If li_filenum = -1 or IsNull ( li_filenum ) Then
	MessageBox ( ls_MessageTitle, "Error creating file" )
	Return -1 
End If

isnull(lblb_Doc)

SelectBLOB img_Docu Into	:lblb_Doc From	mosac Where	idosac = :al_codigo ;
If SQLCA.SQLCode <> 0 Then
	MessageBox ("SQLErrorText", SQLCA.SQLErrText ) ; 	Return -1
End If

long ll_tam , ll_long = 0 ,li_pos=0
ll_tam = len(lblb_Doc) 
isnull(lbl_temp)

If FileWriteEx ( li_FileNum, lblb_Doc,ll_tam ) <= 0 Then
	MessageBox ( ls_MessageTitle, "Error. Please try again" )
	Return -1
End If
FileClose ( li_FileNum )
iole_Doc = Create OLEObject

integer RetVal,li_ret
string ls_err

choose case ls_tipoDocu
	case 'DOC'
		
		If iole_Doc.ConnectToNewObject("word.application") = 0 Then
			iole_Doc.Documents.open( ls_DocPath )
		Else
			MessageBox(ls_MessageTitle, 'Unable to start an OLE server process!', Exclamation!)
		End If
		
	case 'XLS'
		li_ret = iole_Doc.ConnectToObject("excel.application") 
		if li_ret <> 0 then 
			li_ret = iole_Doc.ConnectToNewObject("excel.application")
		end if 
		iole_Doc.workbooks.open( ls_DocPath )	
end choose

// Display the document in Word
iole_Doc.Visible=TRUE
commit;
return 1

//
//choose case li_ret 
//	//case 0 
//	//ls_err='Conexi$$HEX1$$f300$$ENDHEX$$n Satisfactoria con OLE (Excel)' 
//	case -1 
//	ls_err='Error. Llamada Inv$$HEX1$$e100$$ENDHEX$$lida a objeto OLE (Excel)' 
//	case -2 
//	ls_err='Error. Nombre de la clase no encontrada con OLE (Excel)' 
//	case -3 
//	ls_err='Error. El objeto OLEObject no puede ser creado (Excel)' 
//	case -4 
//	ls_err='Error. No se puede conectar con el objeto (EXCEL)' 
//	case -5 
//	ls_err='Error no tratado (EXCEL)' 
//	case else 
//	ls_err='Error desconocido: '+string(li_ret)+'(EXCEL)' 
//end choose 

//If iole_Doc.ConnectToNewObject("excel.application") = 0 Then
//	RetVal = iole_Doc.ConnectToObject (ls_DocPath)
//
//	If RetVal < 0 then
//		MessageBox("Error","ConnectToObject Failed")
//	End If
//Else
//	MessageBox(ls_MessageTitle, 'Unable to start an OLE server process!', Exclamation!)
//End If

end function

on u_cst_grid_bandejaentrada.create
call super::create
end on

on u_cst_grid_bandejaentrada.destroy
call super::destroy
end on

event ue_refrescar;call super::ue_refrescar;dw_1.retrieve(gs_iduser);
dw_2.reset()
commit;

end event

type dw_2 from u_cst_gridmain`dw_2 within u_cst_grid_bandejaentrada
integer y = 1104
integer width = 3351
integer height = 2008
string dataobject = "d_mosac_free"
boolean hscrollbar = true
boolean vscrollbar = true
end type

type st_por from u_cst_gridmain`st_por within u_cst_grid_bandejaentrada
end type

type dw_1 from u_cst_gridmain`dw_1 within u_cst_grid_bandejaentrada
string dataobject = "d_mosac_bandejaentrada_grid"
end type

event dw_1::clicked;call super::clicked;string ls_tipomsj,ls_ruta
integer li_orden
if row<= 0 then return
ls_tipomsj = dw_1.object.tTipoMsj[row]
li_orden = dw_1.object.idorden[row]
ls_ruta = dw_1.object.img_docutxt[row]  
	
choose case ls_tipomsj	
	case 'X'
		dw_2.dataobject = 'd_msj_noconforme_free'
		
	case 'A'
		dw_2.dataobject = 'd_msj_anular_free'
	case 'N'
		dw_2.dataobject = 'd_mosac_free'
		

	case 'D'
		dw_2.dataobject = 'd_msj_free'
	case 'R'
		dw_2.dataobject = 'd_mosac_reenvio_free' //ditribucion o reenvio de mensajes para trabajos
	case 'F'
		dw_2.dataobject = 'd_msj_finalizar_free'
	case 'C'
		dw_2.dataobject = 'd_msj_conformidad_free'
	case	else 
		dw_2.dataobject = 'd_mosac_free'
end choose
dw_2.settransobject( sqlca)
dw_2.retrieve( dw_1.object.data[row,1])

if ls_tipomsj = 'N' then
	if len(ls_ruta) >  0 then
		dw_2.Modify("t_adjuntar.visible = 1")
		dw_2.Modify("img_docutxt.visible = 1")
		dw_2.Modify("b_adjuntar.visible = 1")
	else
		dw_2.Modify("t_adjuntar.visible = 0")
		dw_2.Modify("img_docutxt.visible = 0")
		dw_2.Modify("b_adjuntar.visible = 0")
	end if
end if

dw_2.GetChild("idtiposoli", dwc);dwc.reset();	dwc.settransobject( sqlca);	dwc.retrieve( )
dw_2.GetChild("idcatesoli", dwc);dwc.reset();	dwc.settransobject( sqlca);	dwc.retrieve( )
dw_2.GetChild("idsoli", dwc);dwc.reset();	dwc.settransobject( sqlca);	dwc.retrieve( )
dw_2.GetChild("idarea", dwc);dwc.reset();	dwc.settransobject( sqlca);	dwc.retrieve( )
dw_2.GetChild("idgere", dwc);dwc.reset();	dwc.settransobject( sqlca);	dwc.retrieve( )
end event

type st_categoryname from u_cst_gridmain`st_categoryname within u_cst_grid_bandejaentrada
end type

type ddlb_1 from u_cst_gridmain`ddlb_1 within u_cst_grid_bandejaentrada
end type

type st_split from u_cst_gridmain`st_split within u_cst_grid_bandejaentrada
long backcolor = 134217750
end type

type dw_findoutput from u_cst_gridmain`dw_findoutput within u_cst_grid_bandejaentrada
end type

type pb_close from u_cst_gridmain`pb_close within u_cst_grid_bandejaentrada
end type

type pb_prev from u_cst_gridmain`pb_prev within u_cst_grid_bandejaentrada
end type

type pb_next from u_cst_gridmain`pb_next within u_cst_grid_bandejaentrada
end type

type st_1 from u_cst_gridmain`st_1 within u_cst_grid_bandejaentrada
end type

type st_find from u_cst_gridmain`st_find within u_cst_grid_bandejaentrada
end type

type sle_text from u_cst_gridmain`sle_text within u_cst_grid_bandejaentrada
end type

type cbx_matchcase from u_cst_gridmain`cbx_matchcase within u_cst_grid_bandejaentrada
end type

type st_findback from u_cst_gridmain`st_findback within u_cst_grid_bandejaentrada
end type

type cbx_output from u_cst_gridmain`cbx_output within u_cst_grid_bandejaentrada
end type

type r_1 from u_cst_gridmain`r_1 within u_cst_grid_bandejaentrada
end type

